/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bhatni.messageprocessor;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Viren
 */
public class BaseMessage implements Message {
    private Map<String, Object> header = new HashMap<String,Object>();
    private Object body;

    /**
     * @return the header
     */
    @Override
    public Map<String, Object> getHeader() {
        return header;
    }

    /**
     * @param header the header to set
     */
    @Override
    public void setHeader(Map<String, Object> header) {
        this.header = header;
    }

    /**
     * @return the body
     */
    @Override
    public Object getBody() {
        return body;
    }

    /**
     * @param body the body to set
     */
    @Override
    public void setBody(Object body) {
        this.body = body;
    }

    @Override
    public Object getHeader(String name) {
        return header.get(name);
    }

    @Override
    public void setHeader(String name, Object value) {
        header.put(name, value);
    }

}
